import { listToTreeOptions } from '@/utils/utils'
const treeProject = [
  {
    id: 1,
    name: '成人',
    pid: 0,
  },
  {
    id: 2,
    name: '儿童',
    pid: 0,
  },
  {
    id: 3,
    name: '种植牙',
    pid: 1,
  },
  {
    id: 4,
    name: '正畸',
    pid: 1,
  },
  {
    id: 5,
    name: '修复',
    pid: 1,
  },
  {
    id: 6,
    name: '治疗',
    pid: 1,
  },
  {
    id: 7,
    name: '拔牙',
    pid: 1,
  },
  {
    id: 8,
    name: '补牙',
    pid: 1,
  },
  {
    id: 9,
    name: '牙周护理',
    pid: 1,
  },
  {
    id: 10,
    name: '其他',
    pid: 1,
  },
  {
    id: 11,
    name: '种植牙',
    pid: 2,
  },
  {
    id: 12,
    name: '正畸',
    pid: 2,
  },
  {
    id: 13,
    name: '修复',
    pid: 2,
  },
  {
    id: 14,
    name: '治疗',
    pid: 2,
  },
  {
    id: 15,
    name: '拔牙',
    pid: 2,
  },
  {
    id: 16,
    name: '补牙',
    pid: 2,
  },
  {
    id: 17,
    name: '牙周护理',
    pid: 2,
  },
  {
    id: 18,
    name: '其他',
    pid: 2,
  },
]
export function getTreeProject() {
  const options = listToTreeOptions(treeProject, ({ pid, id, name }) => ({
    parentId: pid,
    id,
    label: name,
    value: name,
  }))
  return options
}
